<div ng-controller="resCtrl">  
  <div class="am-cf am-padding" >
    <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">资源</strong> / <small>Res</small></div>
  </div>

  <div  ng-include="'admin/tpls/res.modal.html'" ng-controller="resModalCtrl" ></div>

  <div class="am-g">
    <div class="am-u-md-6 am-cf">
      <div class="am-fl am-cf">
        <div class="am-btn-toolbar am-fl">
          <div class="am-btn-group am-btn-group-xs">
            <button type="button" class="am-btn am-btn-default"  >
            <span class="am-icon-plus"></span> 新增</button>

            <button type="button" class="am-btn am-btn-default"><span class="am-icon-trash-o"></span> 删除</button>
            <button type="button" class="am-btn am-btn-default" ng-show="showBack" ng-click="back()">
              <span class="am-icon-level-up"></span> 后退</button>
            </div>
          </div>
        </div>      
      </div>
      <div class="am-u-md-3 am-cf">
        <div class="am-fr">
          <div class="am-input-group am-input-group-sm">
            <input type="text" class="am-form-field" > 
            <span class="am-input-group-btn ">
              <button class="am-btn am-btn-default " type="button">搜索</button>
            </span>
          </div>
        </div>
      </div>
    </div>

    <div class="am-g">
      <div class="am-u-sm-12">
        <form class="am-form">
          <table class="am-table am-table-striped am-table-hover table-main">
            <thead>
              <tr>
                <th class="table-check" ><input type="checkbox"    ng-click="choose=!choose" /></th>
                <th class="table-id">ID</th><th class="table-title">资源名</th>
                <th class="table-type">类别</th><th class="table-author">描述</th><th class="table-date">修改日期</th>
                <th class="table-set">操作</th>
              </tr>
            </thead>
            <tbody>

              <tr  ng-repeat="r in list">
                <td><input type="checkbox"   ng-model="choose"    /></td>
                <td>{{r.id}}</td>
                <td>
                  <span ng-if="r.children.length==0" >{{r.text}}</span>
                  <a ng-if="r.children.length>0"    ng-click="go(r.id)" >{{r.text}}</a>
                </td>
                <td ng-if="r.attributes.type==1">菜单</td>
                <td ng-if="r.attributes.type==2">功能</td>

                <td>{{r.attributes.des}}</td>
                <td>{{r.attributes.modifydate}}</td>
                <td>
                  <div class="am-btn-toolbar">
                    <div class="am-btn-group am-btn-group-xs">
                      <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                      <button class="am-btn am-btn-default am-btn-xs am-text-danger"><span class="am-icon-trash-o"></span> 删除</button>
                    </div>
                  </div>
                </td>

              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </form>
  </div>
</div>
 
</div>


